<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>用户表单</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../layui/css/layui.css" media="all">
<script src="../../layui/layui.js" charset="utf-8"></script>
<script src="../../js/projectManagement/project_details.js" charset="utf-8"></script>
<script src="../../js/Utils.js" charset="utf-8"></script>
<script src="../../js/pdfobject.js" charset="utf-8"></script>
</head>
<style> 
body  .layui-layer-page .layui-layer-content {
	overflow: visible;
}
body  .editFile .layui-layer-content {
	overflow: auto;
}
</style>
<body>
	<div id="conditionsDiv">
		<form class="layui-form" id="conditionsForm">
			<div class="layui-form-item">
				&nbsp;&nbsp;&nbsp;&nbsp; <span>业务流程名称：</span>
				<div class="layui-inline">
					<input class="layui-input" placeholder="请输入流程名称" name="nameText" id="nameText" autocomplete="off">
				</div>
				&nbsp;&nbsp;&nbsp;&nbsp; <span>业务流程编号：</span>
				<div class="layui-inline">
					<input class="layui-input" placeholder="请输入流程编号" name="numberText" id="numberText" autocomplete="off">
				</div>	
			</div>
		</form>
		<hr class="layui-bg-gray">
		<span class="layui-breadcrumb" lay-separator="|" style="margin-left: 20px">
               <a href="javascript:findisProcessInstanceRead(2)">全部业务</a>
                <a href="javascript:findisProcessInstanceRead(1)">已读业务</a>
               <a href="javascript:findisProcessInstanceRead(0)">未读业务<span  class="layui-badge" id ="isProcessInstanceReadSpan" style="margin-left:2px;display:none"></span></a>       
         </span>
	</div>
	
	<table class="layui-hide" id="sysuserTable" lay-filter="sysuserTable"></table>
	
	<table class="layui-hide" id="operationRecordTable" lay-filter="operationRecordTable"></table>

	<script type="text/html" id="toolbarSysuser">        	          
         <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="addEmplpyeeBtn" >添加新业务流程</button>		
	</script>

	<!-- 需要弹出的添加项目表单 -->
	<div class="layui-row" id="userAdd" style="display: none">
		<div class="layui-col-md10">
			<form class="layui-form" id="addEmployeeForm">
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label" >业务名称：</label>
					<div class="layui-input-block">
						<input type="text" id="project_name" class="layui-input">
					</div>								
				</div>
				<div class="layui-form-item" id="project_nameTipDiv">
				   <div class="layui-input-block">
					  <label><i class="layui-icon">&#xe702;</i><font color="red"> 请严格遵循 "项目或平台名称简称" + "日期" 的规则命名，平台示例："国六气体机_20190419",项目示例："福田Q2_DAM15KL_国六B_20190419"</font></label>				
			       </div>
			    </div>
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">业务类型：</label>
				    <div class="layui-input-inline">
				      <select id="projectTypeSelect" lay-filter="projectTypeFilter">
				      	<option value="">请选择业务类型</option>
				      </select>
				    </div>	
			    </div>
			    <div class="layui-form-item" style="margin-top: 15px">
				    <label class="layui-form-label">关联项目或平台：</label>
                            <div class="layui-input-inline">
					        <select name="ProjectPlatSelect" lay-verify="required" id="formProjectSelectId"   lay-filter = "formProjectSelectFIlter" lay-search>
					        </select>
					        </div>
			     </div>
			</form>
		</div>
	</div>
	
	<!--审批界面 -->
	<div class="layui-row" id="approvalPopup" style="display: none">
		<div class="layui-col-md10">
			<form class="layui-form" id="approvalForm">
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">当前节点：</label>
					<div class="layui-input-inline">
						<input type="text" id="currentNode" class="layui-input" readOnly>
					</div>
				</div>
				<!-- <div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">下一节点：</label>
					<div class="layui-input-inline">
						<input type="text" id="nextNode" class="layui-input" readOnly>
					</div>
				</div> -->
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">选择节点：</label>
					<div class="layui-input-inline" style="width:200px">
						<select id="transferSelect" lay-filter="transferSelectFilter">
				      </select>
					</div>
				</div>
				<div id = "departmentSelectDiv" class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">接收部门：</label>
				    <div class="layui-input-inline">
				      <select id="departmentSelect" lay-filter="departmentFilter">
				      	 <option value="">请选择部门</option>
				      </select>
				    </div>
				</div>				
				<div id="departmentStaffSelectDiv" class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">接收人：</label>
				    <div class="layui-input-inline">
				       <select  id="departmentStaffSelect">
				      </select>
				    </div>
				</div>
				<div id = "approvingOpinionDiv" class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">审批意见：</label>				    
				      <div class="layui-input-block">
						 <textarea placeholder="请输入审批意见" id="approvingOpinionText" class="layui-textarea"></textarea>
					  </div>				    
				</div>
			</form>
		</div>
	</div>
	
	<!--分发界面 -->
	<div class="layui-row" id="distribution" style="display: none">
		<div class="layui-col-md10">
			
			<div id="distributiondiv" class="layui-form-item" style="margin-top: 15px">
				<label class="layui-form-label">当前节点：</label>
				<div class="layui-input-inline">
					<input type="text" id="BrancheCurrentNode" class="layui-input" readOnly>
				</div>
			</div>	
			<form class="layui-form" id="distributionForm">				
			</form>
		</div>
	</div>
	
	<!--驳回选节点 -->
	<div class="layui-row" id="SelectApprovalDiv" style="display: none;width:500px">
		<div class="layui-col-md10">
			<form class="layui-form" id="approvalForm">
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label" style="width:150px">选择要驳回到的节点：</label>
					<div class="layui-input-inline" style="width:200px">
						<select id="approvalSelect" lay-filter="approvalSelectFilter">
				      </select>
					</div>
				</div>
			</form>
		</div>
	</div>
	
	    <!-- 标定数据文件上传流程弹窗 -->
	    <div  id="calibrationDataAdd" style="display: none;">				
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
			  <legend>程序和标定数据文件</legend>
			</fieldset>		
			 <a id ="uploadGlobalFileBtn" type="button"  class="layui-btn layui-btn-sm" href="javascript:showUploadGlobalFileTable()" style="margin-left: 30px;"><i class="layui-icon">&#xe61f;</i>添加程序或标定数据文件</a>
			 <a type="button" class="layui-btn layui-btn-sm" href="javascript:downLoadProgramFilesToZip()" style="margin-left: 30px;"><i class="layui-icon">&#xe601;</i>全部下载为压缩包</a>
			 <a type="button" class="layui-btn layui-btn-sm" href="javascript:showPlatFileTable()" style="margin-left: 30px;"><i class="layui-icon">&#xe621;</i>项目相关的平台文件</a>
			 <a type="button" id ="mergeFileBtn" class="layui-btn layui-btn-sm" href="javascript:showMergeFileDiv()" style="margin-left: 30px;"><i class="layui-icon">&#xe631;</i>标定数据文件和程序文件绑定</a>
	         <table id ="globalFileTable" lay-filter = "globalFileTable" ></table>
	         <fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
			  <legend>流程详情</legend>
			</fieldset>	
			<ul class="layui-timeline" id="processInstanceHistroyRecordUl" style="margin-left: 15px;margin-right: 15px">
			</ul>		
			<div style="margin-top: 15px">
			    <label class="layui-form-label"><strong>附件上传：</strong></label>			
				<button title="上传测试报告等文件" type="button" class="layui-btn layui-btn-radius layui-btn-normal" id="upLoadCalibrationDataLayerBtn"><i class="layui-icon"></i>选择附件</button>
				<ul class = "list" id="uploadFileNameUl" style="margin-left: 120px"></ul>					
			</div>
			<br>
			<div style="margin-right: 15px">
				<label class="layui-form-label"><strong>备注：</strong></label>
				<div class="layui-input-block">
				<textarea placeholder="请输入备注" id="formCalibrationDataRemarksText" class="layui-textarea"></textarea>
				</div>
			</div>
			<br>
			<div style="text-align:center;margin-bottom: 15px;">
				<button type="button" class="layui-btn layui-btn-radius layui-btn-normal" id="addCalibrationDataLayerBtn">上传</button>
				<button type="button" class="layui-btn layui-btn-radius layui-btn-normal" id="formCancelLayerBtn">取消</button>
			</div>				
	    </div>
	
	 <div id="taskAttachmentsTableDiv"  style="display: none;" >
        <a type="button" class="layui-btn layui-btn-sm" href="javascript:downLoadMutilFilesToZip()" style="margin-top: 15px;margin-left: 30px;"><i class="layui-icon">&#xe601;</i>全部下载为压缩包</a>
        <a class="layui-btn layui-b	tn-danger layui-btn-sm demo-Delete" href="javascript:deleteAttachmentsById()" id="deleteAttachmentsBtn" style="margin-top: 15px;margin-left: 30px;" ><i class="layui-icon">&#xe640;</i>删除已选文件</a>
	    <table id ="taskAttachmentsTable" lay-filter = "taskAttachmentsTable" ></table>
	</div>	
	
	 <div id="singleglobalFileTableDiv"  style="display: none;" >
        <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"  style="margin-top: 15px;margin-left: 30px;" id="test8">选择最新版文件</button>
        <button type="button" class="layui-btn layui-btn-sm" style="margin-top: 15px;margin-left: 30px;" id="test9"><i class="layui-icon">&#xe62f;</i>开始上传</button>
	    <a type="button" class="layui-btn layui-btn-sm layui-btn-normal" href="javascript:downLoadGlobalMutilFilesToZip()" style="margin-top: 15px;margin-left: 30px;"><i class="layui-icon">&#xe601;</i>全部下载为压缩包</a>
	    <table id ="singleGlobalFileHisTable" lay-filter = "singleGlobalFileHisTable" ></table>
	</div>	
	
	<!-- 文档预览 -->
	<div id="pdf_preview"  style="text-align:center;height:600px"></div> 
	 	
	<script type="text/html" id="barSysuser">
		<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="approval">移交</a>
		<a class="layui-btn layui-btn-xs" lay-event="edit">上传</a>
		<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="operationRecord">记录</a>
         <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
		
	</script>
	
	<script type="text/html" id="barAttachments">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="show" style="margin-left: 15px;">查看</a>
		<a class="layui-btn layui-btn-xs" lay-event="downLoad" style="margin-left: 15px;">下载</a>
	</script>
	
	
	<script type="text/html" id="barSingleGlobalFile">
        <a class="layui-btn layui-btn-xs" lay-event="downLoad" style="margin-left: 15px;">下载</a>
	</script>
	
	<div id = "uploadGlobalFileListDiv" style="display: none;">
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
		  <legend>全局文件上传列表</legend>
		</fieldset> 
	 
		<div class="layui-upload" style="margin-bottom: 15px;">
		  <button type="button" class="layui-btn layui-btn-normal" id="testList" style="margin-left: 30px;"><i class="layui-icon">&#xe655;</i>选择多文件</button> 
		  <div class="layui-upload-list" >
		    <table class="layui-table">
		      <thead>
		        <tr><th>文件名</th>
		        <th>大小</th>
		        <th>状态</th>
		        <th>操作</th>
		      </tr></thead>
		      <tbody id="demoList"></tbody>
		    </table>
		  </div>
		  <button type="button" class="layui-btn" id="testListAction" style="margin-left: 30px;"><i class="layui-icon">&#xe67c;</i>开始上传</button>
		</div> 
	</div>
	
	<div id="platProcessInstanceTableDiv"  style="display: none;margin-top: 15px;margin-left: 15px;margin-right: 15px;margin-bottom: 15px ">
	   <table class="layui-hide" id="platProcessInstanceTable" lay-filter="platProcessInstanceTable"></table>
	</div>
	
	<script type="text/html" id="barPlatProcessInstance">
		<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="details" style="margin-left: 15px">详情</a>
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="attachments" style="margin-left: 15px">附件</a>
	</script>
	
	<div id="platProcessInstanceFileTableDiv" style="display: none;">
	   <a type="button" class="layui-btn layui-btn-sm" href="javascript:downLoadplatProcessInstanceFileToZip()" style="margin-top: 15px;margin-left: 30px;"><i class="layui-icon">&#xe601;</i>全部下载为压缩包</a>
	   <table class="layui-hide" id="platProcessInstanceFileTable" lay-filter="platProcessInstanceFileTable"></table>
	</div>
	
	<script type="text/html" id="barPlatProcessInstanceFile">
        <a class="layui-btn  layui-btn-xs" lay-event="downLoad">下载</a>
	</script>
	
	<div id="attachmentsTableDiv" style="display: none;">
	   <a type="button" class="layui-btn layui-btn-sm" href="javascript:downLoadAttachmentsFilesToZip()" style="margin-top: 15px;margin-left: 30px;"><i class="layui-icon">&#xe601;</i>全部下载为压缩包</a>
	   <table class="layui-hide" id="attachmentsTable" lay-filter="attachmentsTable"></table>
	</div>
	
	<!-- 需要弹出的添加项目表单 -->
	<div class="layui-row" id="mergeFileDiv" style="display: none">
		<div class="layui-col-md10">
			<form class="layui-form" id="mergeFileForm">
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label" style="width:175px">请选择程序文件版本：</label>
					<div class="layui-input-inline" style="width:400px">
				         <select name="PlatProcessInstanceSelect" lay-verify="required" id="platProcessInstanceSelectId"   lay-filter = "PlatProcessInstanceSelectFIlter" lay-search>
				        </select>
					 </div>	
					 						
				</div>
				<div class="layui-form-item" style="margin-top: 15px">
				<label class="layui-form-label" style="width:175px">程序文件：</label>
					<div class="layui-input-inline" style="width:400px">
				       	<input type="text" id="programFileNameInput" data-url="" class="layui-input" readOnly>				         
					 </div>	
				</div>
				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label" style="width:175px">请选择标定数据文件版本：</label>
					<div class="layui-input-inline" style="width:400px">
					    <select name="ProjectProcessInstanceSelect" lay-verify="required" id="projectProcessInstanceSelectId"   lay-filter = "ProjectProcessInstanceSelectFIlter" lay-search>
				        </select>
				       
					 </div>	
				</div>		 
			    <div class="layui-form-item" style="margin-top: 15px">
					 <label class="layui-form-label" style="width:175px">标定数据文件：</label>
					<div class="layui-input-inline" style="width:400px">
				       	<input type="text" id="dataFileNameInput" data-url="" class="layui-input" readOnly>				         
					 
				</div>	 						
				</div>
			</form>
		</div>
	</div>
	
	<script type="text/html" id="barAttachments">
        <a class="layui-btn  layui-btn-xs" lay-event="downLoad">下载</a>
	</script>

</body>	
</html>